Analysis of ARPAV Temperature Data
In this project, we will examine temperature data coming from ARPAV (Agenzia Regionale per la Protezione dell’Ambiente - Veneto) stations over the Veneto region. Most of the analysis pertains to the following locations:
| Station | Latitude | Longitude | Height above sea level |
|---|---|---|---|
| Auronzo di Cadore | 46°33′33″ N | 12°25′28″ E | 887 m |
| Castelfranco Veneto | 45°40′00″ N | 11°55′00″ E | 46 m |
| Cavallino-Treporti | 45°27′31″ N | 12°29′11″ E | 1 m |
| Malo | 45°40′10″ N | 11°27′52″ E | 98 m |
| Porto Tolle | 44°56′58″ N | 12°19′28″ E | -22 m |
| Roverchiara | 45°16′10″ N | 11°14′41″ E | 20 m |
We have access to daily temperature records (minimum, average and maximum) in different temporal windows over the past three or four decades (see later for details).
The main goal of the project is to investigate the temperature trend over the years, as recorded by these stations, and test if there is a general increase in temperature, compatibly with the climate change.
Data import and pre-processing
library(tidyverse)
library(R2jags)
library(bayesplot)
global_seed <- 30172
set.seed(global_seed)
global_font <- "Roboto Condensed"
theme_set(theme_minimal(base_size = 15, base_family = global_font))
my_pal <- wesanderson::wes_palette("Zissou1", 5)[c(1, 3, 5)]First, we inspect the datasets with a function that does minimal
manipulations; the data is stored in csv files holding
daily temperatures records in each row.
get_daily_data <- function(station) {
require(readr)
fname <- paste0("./data/daily/", station, ".csv")
read_csv(
fname,
col_names = c("date", "min", "avg", "max"),
skip = 1,
show_col_types = FALSE
) |> na.omit()
}get_daily_data("malo") |>
head() |>
kableExtra::kbl() |>
kableExtra::kable_styling(full_width = FALSE)| date | min | avg | max |
|---|---|---|---|
| 1992-04-01 | 5.0 | 7.3896 | 10.7 |
| 1992-04-03 | 5.0 | 7.9406 | 10.2 |
| 1992-04-04 | 8.2 | 10.1427 | 12.1 |
| 1992-04-05 | 7.9 | 9.9563 | 11.3 |
| 1992-04-06 | 8.3 | 9.3021 | 11.9 |
| 1992-04-07 | 7.7 | 10.8646 | 15.1 |
get_daily_data("malo") |>
ggplot(aes(x = date)) +
geom_point(aes(y = min, colour = "min"), size = 0.1) +
geom_point(aes(y = max, colour = "max"), size = 0.1) +
geom_point(aes(y = avg, colour = "avg"), size = 0.1) +
scale_colour_manual(
values = my_pal |> set_names("min", "avg", "max"),
labels = list(min = "Minima", avg = "Averages", max = "Maxima")
) +
guides(colour = guide_legend(override.aes = list(size = 3))) +
labs(
x = "Date", y = "Temperature (°C)",
colour = element_blank(),
title = "Evolution of daily temperatures in Malo"
)